package com.hzdp.coc;

import java.util.concurrent.ScheduledThreadPoolExecutor;
import java.util.concurrent.TimeUnit;

public class ScheduleThreadPoolDemo {

	public static void main(String[] args) {
		ScheduledThreadPoolExecutor pool = new ScheduledThreadPoolExecutor(1);
		pool.scheduleAtFixedRate(new MyThread(0), 1000, 3000, TimeUnit.MILLISECONDS);
		pool.scheduleAtFixedRate(new MyThread(1), 1000, 2000, TimeUnit.MILLISECONDS);
	}
}
